package com.yjhealth.libs.commonlib.base.activity;

import com.yjhealth.libs.commonlib.R;
import com.yjhealth.libs.core.core.activity.CoreListActivity;
import com.yjhealth.libs.commonlib.event.LogoutEvent;
import com.yjhealth.libs.core.thirdpart.statusbarutil.StatusBarUtil;

import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;

public abstract class BaseListActivity extends CoreListActivity {
    @Override
    protected void setStatusBar() {
        StatusBarUtil.setDarkMode(this);
        StatusBarUtil.setColor(this, getResources().getColor(R.color.yjhealth_common_theme_color), 0);
    }

    protected void logout() {
        finish();
    }

    @Subscribe(threadMode = ThreadMode.MAIN, priority = 0)
    public void event(LogoutEvent coreEvent) {
        logout();
    }
}
